
package Programas;

//hace la formula general


import java.util.Scanner;


public class Formula_G {


  public static void main(String[] args) {
      double x, y, a, b, c;

        Scanner sc= new Scanner(System.in);
        System.out.println("Introduce tres variables");


       System.out.println("a:");
        a=sc.nextInt();
       System.out.println("b:");
       b=sc.nextInt();
       System.out.println("c:");
       c=sc.nextInt();

      x=(-b+(Math.sqrt(Math.pow(b, 2)-4*a*c)))/2*a;
        System.out.println(x);
       y=(-b-(Math.sqrt(Math.pow(b, 2)-4*a*c)))/2*a;
      System.out.println(y);


   }
}